package com.ressource;

/**
 * @author jonathan
 * @author fabienne
 */
public final class ColoredString
{
	/**
	 * 
	 */
	private String	string			= null;
	/**
	 * 
	 */
	private String	originalString	= null;

	/**
	 * @param string
	 */
	public ColoredString(String string)
	{
		this.string = string;
		this.originalString = string;
	}

	/**
	 * @param integer
	 */
	public ColoredString(Integer integer)
	{
		this.string = integer.toString();
		this.originalString = string;
	}
	/**
	 * 
	 */
	public ColoredString()
	{
		this.string = "";
		this.originalString = "";
	}
	
	/**
	 * @param character
	 */
	public ColoredString(char character)
	{
		this.string = Character.toString(character);
	}

	/**
	 * @return
	 */
	/**
	 * @return
	 */
	public String getString()
	{
		return string;
	}

	/**
	 * @param string
	 */
	public void setString(String string)
	{
		this.string = string;
	}
	
	/**
	 * @return
	 */
	public String getOriginalString()
	{
		return originalString;
	}
	
	/**
	 * @param originalString
	 */
	public void setOriginalString(String originalString)
	{
		this.string = originalString;
		this.originalString = originalString;
	}

	/**
	 * @param originalString
	 */
	public void setOriginalString(Integer originalString)
	{
		this.string = originalString.toString();
		this.originalString = originalString.toString();
	}

	/**
	 * 
	 */
	public void red()
	{
		string = "\033[31m" + originalString + "\033[0m";
	}

	/**
	 * 
	 */
	public void green()
	{
		string = "\033[32m" + originalString + "\033[0m";
	}

	/**
	 * 
	 */
	public void yellow()
	{
		string = "\033[33m" + originalString + "\033[0m";
	}

	/**
	 * 
	 */
	public void blue()
	{
		string = "\033[34m" + originalString + "\033[0m";
	}

	/**
	 * 
	 */
	public void magenta()
	{
		string = "\033[35m" + originalString + "\033[0m";
	}

	/**
	 * 
	 */
	public void cyan()
	{
		string = "\033[36m" + originalString + "\033[0m";
	}

	/**
	 * 
	 */
	public void lightGrey()
	{
		string = "\033[37m" + originalString + "\033[0m";
	}

	/**
	 * 
	 */
	public void removeColor()
	{
		string = originalString;
	}


	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#toString()
	 */
	public String toString()
	{
		return string;
	}
}
